i2c: Fix i2c speed command
authorDarwin Rambo <[email protected]>
Fri, 13 Dec 2013 20:57:26 +0000 (12:57 -0800)
committerHeiko Schocher <[email protected]>
Mon, 13 Jan 2014 07:17:51 +0000 (08:17 +0100)
commit7cc1b02f8f73fc0b5e1531a1e16b1c00819d5222
tree706acdeb741c09d0bf63e989e51d7e8605ab7e7f
parent6d001e7df9e4b33b9be9bc4117091365b2ff1607
i2c: Fix i2c speed command

This corrects i2c core to interpret the value returned by
i2c_set_bus_speed as a success indicator rather than the
actual speed that was set. When i2c_set_bus_speed returns
a failure code, the speed is unknown so the adapter speed
is set to zero.

Signed-off-by: Darwin Rambo <[email protected]>
Reviewed-by: Tim Kryger <[email protected]>
Reviewed-by: Steve Rae <[email protected]>
Acked-by: Jagannadha Sutradharudu Teki <[email protected]>
drivers/i2c/i2c_core.c